package getproperties.ByResourceBundle;

import org.springframework.stereotype.Controller;

import java.util.ResourceBundle;

/**
 * @Description
 * @Author zhoucq
 * @Date 2025/9/27 16:24
 * @Version 1.0
 * 通过ResourceBundle类获取，
 */
@Controller
public class Demo02 {
    public static void main(String[] args) {
        //适用于国际化或多环境配置，无需文件后缀名，通过基名（如）加载
        ResourceBundle bundle = ResourceBundle.getBundle("config/config02");
        String value = bundle.getString("properties.demo02.name");
        System.out.println(value);
    }
}
